#include "csapp.h"


int main()
{
  int fd2;
char c;
//  fd1 = open("foobar.txt", O_RDONLY, 0);
 // Read(fd1,&c,1);
  fd2 = open("foobar.txt", O_RDONLY, 0);
if(Fork()=0)
{
Read(fd2,&c,1);
exit(0);
}

Wait(NULL);
  Read(fd2,&c,1);
  printf("c = %c\n", c);
  exit(0);
}

